package com.huitu.whht.base.core.api.wq.swsinf;

import com.huitu.api.rest.AbstractApiResource;
import com.huitu.commons.PageUtils;
import com.huitu.whht.api.core.common.response.ApiResultBuilder;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiResource;
import com.huitu.whht.api.core.common.annotations.SzyCoreApiService;
import com.huitu.whht.api.core.common.response.StatusRespBuilder;

import com.huitu.whht.base.core.api.wq.swsinf.entities.WqSwsinfB;

import com.huitu.whht.base.core.api.wq.swsinf.entities.WqSwsinfBQo;
import com.huitu.whht.base.core.api.wq.swsinf.service.IWqSwsinfBService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

/**
 * 说明: API,表名称: WQ_SWSINF_B <br/>
 * 日期: 2019-04-11
 * @author LiuCW
 */
@Component
@SzyCoreApiResource
@Path("wq/swsinf/b")
public class WqSwsinfBResource extends AbstractApiResource {

    private static final Logger LOGGER = LoggerFactory.getLogger(WqSwsinfBResource.class);

    private static final String UUID = "20781f27-835c-4cfa-8567-f10bbe9717d2";

    @Override
    public String getUUID() {
        return UUID;
    }

    @Autowired
    @SzyCoreApiService
    IWqSwsinfBService wqSwsinfBService;

    /**
     * @api {get} wq/swsinf/b/{stcd:\\w{8}} [R][G]根据主键查询
     * @apiDescription [G]根据主键查询WQ_SWSINF_B()数据
     * @apiName (generate)select by primary key
     * @apiGroup WQ_SWSINF_B-
     * @apiVersion 1.0.0
     * @apiSampleRequest wq/swsinf/b/61783000
     * @apiParam   {String}         stcd               【必须】测站编码
     * @apiSuccess {String}         stcd               测站编码
     * @apiSuccess {String}         watp               测站名称
     * @apiSuccess {String}         bsnm               测站等级
     * @apiSuccess {String}         hnnm               测站类别
     * @apiSuccess {String}         rvnm               经度
     * @apiSuccess {Double}         asrl               纬度
     * @apiSuccess {Double}         asar               纬度
     * @apiSuccess {Double}         asrc               行政区划代码
     * @apiSuccess {Double}         dstrvm             水资源分区代码
     * @apiSuccess {String}         lrcd               管理单位
     * @apiSuccess {Date}           fsst               监测单位(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {Date}           fset               监测频次(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiSuccess {String}         bfl                建站年月
     * @apiSuccess {String}         bfd                撤站年月
     * @apiSuccess {String}         wsfl               备注
     * @apiSuccess {String}         wsct               暂无注释
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "stcd": "61783000",
     * "watp": "1",
     * "bsnm": null,
     * "hnnm": null,
     * "rvnm": null,
     * "asrl": null,
     * "asar": null,
     * "asrc": null,
     * "dstrvm": null,
     * "lrcd": null,
     * "fsst": null,
     * "fset": null,
     * "bfl": null,
     * "bfd": null,
     * "wsfl": null,
     * "wsct": null
     *  }
     * }
     * @apiUse exceptions
     */
    @GET
    @Path("{stcd:\\w{8}}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectByPrimaryKey(@PathParam("stcd") String stcd) {
        LOGGER.info("根据主键查询 ,参数 stcd:{}", stcd);
        return Response.ok(ApiResultBuilder.create(this, wqSwsinfBService.selectByPrimaryKey(stcd))).build();
    }

    /**
     * @api {post} wq/swsinf/b/list [R][G]根据条件查询
     * @apiDescription [G]根据条件查询WQ_SWSINF_B()数据
     * @apiName (generate)select by filter
     * @apiGroup WQ_SWSINF_B-
     * @apiVersion 1.0.0
     * @apiSampleRequest wq/swsinf/b/list
     * @apiParam   {String}         stcd               测站编码
     * @apiParam   {List(String)}   watpList           (数组)测站名称
     * @apiParam   {String}         bsnm               测站等级
     * @apiParam   {String}         hnnm               测站类别
     * @apiParam   {String}         rvnm               经度
     * @apiParam   {Double}         asrlMin            (最小)纬度
     * @apiParam   {Double}         asrlMax            (最大)纬度
     * @apiParam   {Double}         asarMin            (最小)纬度
     * @apiParam   {Double}         asarMax            (最大)纬度
     * @apiParam   {Double}         asrcMin            (最小)行政区划代码
     * @apiParam   {Double}         asrcMax            (最大)行政区划代码
     * @apiParam   {Double}         dstrvmMin          (最小)水资源分区代码
     * @apiParam   {Double}         dstrvmMax          (最大)水资源分区代码
     * @apiParam   {String}         lrcd               管理单位
     * @apiParam   {Date}           fsstBgTm           (开始时间)监测单位
     * @apiParam   {Date}           fsstEdTm           (结束时间)监测单位
     * @apiParam   {Date}           fsetBgTm           (开始时间)监测频次
     * @apiParam   {Date}           fsetEdTm           (结束时间)监测频次
     * @apiParam   {List(String)}   bflList            (数组)建站年月
     * @apiParam   {String}         bfd                撤站年月
     * @apiParam   {List(String)}   wsflList           (数组)备注
     * @apiParam   {String}         wsct               暂无注释
     * @apiSuccess {String}         stcd               测站编码
     * @apiSuccess {String}         watp               测站名称
     * @apiSuccess {String}         bsnm               测站等级
     * @apiSuccess {String}         hnnm               测站类别
     * @apiSuccess {String}         rvnm               经度
     * @apiSuccess {Double}         asrl               纬度
     * @apiSuccess {Double}         asar               纬度
     * @apiSuccess {Double}         asrc               行政区划代码
     * @apiSuccess {Double}         dstrvm             水资源分区代码
     * @apiSuccess {String}         lrcd               管理单位
     * @apiSuccess {Date}           fsst               监测单位
     * @apiSuccess {Date}           fset               监测频次
     * @apiSuccess {String}         bfl                建站年月
     * @apiSuccess {String}         bfd                撤站年月
     * @apiSuccess {String}         wsfl               备注
     * @apiSuccess {String}         wsct               暂无注释
     * @apiSuccessExample 请求成功:
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "stcd": "61783000",
     * "watp": "1",
     * "bsnm": null,
     * "hnnm": null,
     * "rvnm": null,
     * "asrl": null,
     * "asar": null,
     * "asrc": null,
     * "dstrvm": null,
     * "lrcd": null,
     * "fsst": null,
     * "fset": null,
     * "bfl": null,
     * "bfd": null,
     * "wsfl": null,
     * "wsct": null
     *  }]
     * }
     *
     * @apiSuccessExample 分页请求:
     * request header: Rang={max=50;size=50;field=TS DESC}
     * HTTP/1.1 200 OK
     * {
     * "result": [{
     * "stcd": "61783000",
     * "watp": "1",
     * "bsnm": null,
     * "hnnm": null,
     * "rvnm": null,
     * "asrl": null,
     * "asar": null,
     * "asrc": null,
     * "dstrvm": null,
     * "lrcd": null,
     * "fsst": null,
     * "fset": null,
     * "bfl": null,
     * "bfd": null,
     * "wsfl": null,
     * "wsct": null
     *  }],
     * "paging": {
     * "count": 3,
     * "total": 120,
     * "finale": false,
     * "index": 1
     * }
     * }
     * @apiUse header_rang
     * @apiUse exceptions
     */
    @POST
    @Path("list")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response selectList(WqSwsinfBQo filter) {
        PageUtils.startPageFromRang();
        LOGGER.info("根据条件查询 ,参数 WqSwsinfBQo:{}", filter);
        return Response.ok(ApiResultBuilder.create(this, wqSwsinfBService.selectList(filter))).build();
    }

    /**
     * @api {put} wq/swsinf/b [C][G]新增数据
     * @apiPrivate
     * @apiDescription [G]新增WQ_SWSINF_B()数据
     * @apiName (generate)add data
     * @apiGroup WQ_SWSINF_B-
     * @apiVersion 1.0.0
     * @apiParam   {String}         stcd               【必须】测站编码
     * @apiParam   {String}         watp               测站名称
     * @apiParam   {String}         bsnm               测站等级
     * @apiParam   {String}         hnnm               测站类别
     * @apiParam   {String}         rvnm               经度
     * @apiParam   {Double}         asrl               纬度
     * @apiParam   {Double}         asar               纬度
     * @apiParam   {Double}         asrc               行政区划代码
     * @apiParam   {Double}         dstrvm             水资源分区代码
     * @apiParam   {String}         lrcd               管理单位
     * @apiParam   {Date}           fsst               监测单位(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {Date}           fset               监测频次(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         bfl                建站年月
     * @apiParam   {String}         bfd                撤站年月
     * @apiParam   {String}         wsfl               备注
     * @apiParam   {String}         wsct               暂无注释
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest wq/swsinf/b
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "stcd": "61783000"
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "stcd": "61783000"
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "stcd": "61783000",
     * "watp": "1",
     * "bsnm": null,
     * "hnnm": null,
     * "rvnm": null,
     * "asrl": null,
     * "asar": null,
     * "asrc": null,
     * "dstrvm": null,
     * "lrcd": null,
     * "fsst": null,
     * "fset": null,
     * "bfl": null,
     * "bfd": null,
     * "wsfl": null,
     * "wsct": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insert(WqSwsinfB record) {
        LOGGER.info("新增 ,参数 WqSwsinfB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(wqSwsinfBService.insertSelective(record),record))).build();
    }

    /**
     * @api {post} wq/swsinf/b/insertBatch [C][G]批量新增数据
     * @apiPrivate
     * @apiDescription [G]批量新增WQ_SWSINF_B()数据
     * @apiName (generate)addBatch data
     * @apiGroup WQ_SWSINF_B-
     * @apiVersion 1.0.0
     * @apiParam   {String}         stcd               【必须】测站编码
     * @apiParam   {String}         watp               测站名称
     * @apiParam   {String}         bsnm               测站等级
     * @apiParam   {String}         hnnm               测站类别
     * @apiParam   {String}         rvnm               经度
     * @apiParam   {Double}         asrl               纬度
     * @apiParam   {Double}         asar               纬度
     * @apiParam   {Double}         asrc               行政区划代码
     * @apiParam   {Double}         dstrvm             水资源分区代码
     * @apiParam   {String}         lrcd               管理单位
     * @apiParam   {Date}           fsst               监测单位(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {Date}           fset               监测频次(时间格式 <font color='red'>yyyy-MM-dd HH:mm:ss</font>)
     * @apiParam   {String}         bfl                建站年月
     * @apiParam   {String}         bfd                撤站年月
     * @apiParam   {String}         wsfl               备注
     * @apiParam   {String}         wsct               暂无注释
     * @apiSuccess {Integer}        status             1:新增成功;0:新增失败.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据,通常包含新增数据的主键值
     * @apiSampleRequest wq/swsinf/b/insertBatch
     * @apiSuccessExample 新增成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":{
     *   "stcd": "61783000"
     *      }
     *   }
     * }
     @apiSuccessExample 新增失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":{
     *   "stcd": "61783000"
     *      }
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "stcd": "61783000",
     * "watp": "1",
     * "bsnm": null,
     * "hnnm": null,
     * "rvnm": null,
     * "asrl": null,
     * "asar": null,
     * "asrc": null,
     * "dstrvm": null,
     * "lrcd": null,
     * "fsst": null,
     * "fset": null,
     * "bfl": null,
     * "bfd": null,
     * "wsfl": null,
     * "wsct": null
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("insertBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response insertBatch(List<WqSwsinfB> recordList) {
        LOGGER.info("批量新增 ,参数 WqSwsinfB:[]", recordList);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.insert(wqSwsinfBService.insertBatch(recordList),recordList))).build();
    }

    /**
     * @api {put} wq/swsinf/b/{stcd:\\w{8}}/update [U][G]根据主键修改
     * @apiPrivate
     * @apiDescription [G]根据主键修改WQ_SWSINF_B()数据
     * @apiName (generate)update data
     * @apiGroup WQ_SWSINF_B-
     * @apiVersion 1.0.0
     * @apiParam   {String}         stcd               【必须】测站编码
     * @apiParam   {String}         watp               测站名称
     * @apiParam   {String}         bsnm               测站等级
     * @apiParam   {String}         hnnm               测站类别
     * @apiParam   {String}         rvnm               经度
     * @apiParam   {Double}         asrl               纬度
     * @apiParam   {Double}         asar               纬度
     * @apiParam   {Double}         asrc               行政区划代码
     * @apiParam   {Double}         dstrvm             水资源分区代码
     * @apiParam   {String}         lrcd               管理单位
     * @apiParam   {Date}           fsst               监测单位
     * @apiParam   {Date}           fset               监测频次
     * @apiParam   {String}         bfl                建站年月
     * @apiParam   {String}         bfd                撤站年月
     * @apiParam   {String}         wsfl               备注
     * @apiParam   {String}         wsct               暂无注释
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest wq/swsinf/b/61783000/update
     * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "stcd": "61783000",
     * "watp": "1",
     * "bsnm": null,
     * "hnnm": null,
     * "rvnm": null,
     * "asrl": null,
     * "asar": null,
     * "asrc": null,
     * "dstrvm": null,
     * "lrcd": null,
     * "fsst": null,
     * "fset": null,
     * "bfl": null,
     * "bfd": null,
     * "wsfl": null,
     * "wsct": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{stcd:\\w{8}}/update")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response update(@PathParam("stcd") String stcd, WqSwsinfB record) {
        record.setStcd(stcd);
        LOGGER.info("根据主键修改 ,参数 WqSwsinfB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wqSwsinfBService.updateByPrimaryKey(record)))).build();
    }

    /**
     * @api {put} wq/swsinf/b/{stcd:\\w{8}}/update-selective [U][G]根据主键修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据主键修改WQ_SWSINF_B()数据,只修改非null字段
     * @apiName (generate)update selected data
     * @apiGroup WQ_SWSINF_B-
     * @apiVersion 1.0.0
     * @apiParam   {String}         stcd               测站编码
     * @apiParam   {String}         watp               测站名称
     * @apiParam   {String}         bsnm               测站等级
     * @apiParam   {String}         hnnm               测站类别
     * @apiParam   {String}         rvnm               经度
     * @apiParam   {Double}         asrl               纬度
     * @apiParam   {Double}         asar               纬度
     * @apiParam   {Double}         asrc               行政区划代码
     * @apiParam   {Double}         dstrvm             水资源分区代码
     * @apiParam   {String}         lrcd               管理单位
     * @apiParam   {Date}           fsst               监测单位
     * @apiParam   {Date}           fset               监测频次
     * @apiParam   {String}         bfl                建站年月
     * @apiParam   {String}         bfd                撤站年月
     * @apiParam   {String}         wsfl               备注
     * @apiParam   {String}         wsct               暂无注释
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest wq/swsinf/b/61783000/update-selective
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * {
     * "stcd": "61783000",
     * "watp": "1",
     * "bsnm": null,
     * "hnnm": null,
     * "rvnm": null,
     * "asrl": null,
     * "asar": null,
     * "asrc": null,
     * "dstrvm": null,
     * "lrcd": null,
     * "fsst": null,
     * "fset": null,
     * "bfl": null,
     * "bfd": null,
     * "wsfl": null,
     * "wsct": null
     * }
     * @apiUse exceptions
     */
    @PUT
    @Path("{stcd:\\w{8}}/update-selective")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateSelective(@PathParam("stcd") String stcd, WqSwsinfB record) {
        record.setStcd(stcd);
        LOGGER.info("根据主键修改(只修改非null字段) ,参数 WqSwsinfB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wqSwsinfBService.updateByPrimaryKeySelective(record)))).build();
    }

    /**
     * @api {post} wq/swsinf/b/updateBatch [U][G]根据主键批量修改(只修改非null字段)
     * @apiPrivate
     * @apiDescription [G]根据批量主键修改WQ_SWSINF_B()数据,只修改非null字段
     * @apiName (generate)updateBatch selected data
     * @apiGroup WQ_SWSINF_B-
     * @apiVersion 1.0.0
     * @apiParam   {String}         stcd               测站编码
     * @apiParam   {String}         watp               测站名称
     * @apiParam   {String}         bsnm               测站等级
     * @apiParam   {String}         hnnm               测站类别
     * @apiParam   {String}         rvnm               经度
     * @apiParam   {Double}         asrl               纬度
     * @apiParam   {Double}         asar               纬度
     * @apiParam   {Double}         asrc               行政区划代码
     * @apiParam   {Double}         dstrvm             水资源分区代码
     * @apiParam   {String}         lrcd               管理单位
     * @apiParam   {Date}           fsst               监测单位
     * @apiParam   {Date}           fset               监测频次
     * @apiParam   {String}         bfl                建站年月
     * @apiParam   {String}         bfd                撤站年月
     * @apiParam   {String}         wsfl               备注
     * @apiParam   {String}         wsct               暂无注释
     * @apiSuccess {Integer}        status             1:修改成功;0:要修改的数据不存在(可能已被删除)
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSampleRequest  wq/swsinf/b/updateBatch
     * * @apiSuccessExample 修改成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 修改失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiParamExample {json} 请求示例:
     * [{
     * "stcd": "61783000",
     * "watp": "1",
     * "bsnm": null,
     * "hnnm": null,
     * "rvnm": null,
     * "asrl": null,
     * "asar": null,
     * "asrc": null,
     * "dstrvm": null,
     * "lrcd": null,
     * "fsst": null,
     * "fset": null,
     * "bfl": null,
     * "bfd": null,
     * "wsfl": null,
     * "wsct": null
     * }]
     * @apiUse exceptions
     */
    @POST
    @Path("updateBatch")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response updateBatch(List<WqSwsinfB> record) {
        LOGGER.info("根据主键批量修改(只修改非null字段) ,参数 WqSwsinfB:{}", record);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.update(wqSwsinfBService.updateBatch(record)))).build();
    }

    /**
     * @api {delete} wq/swsinf/b/{stcd:\\w{8}} [D][G]根据主键删除
     * @apiPrivate
     * @apiDescription [G]根据主键删除WQ_SWSINF_B()数据
     * @apiName (generate)delete by primary key
     * @apiGroup WQ_SWSINF_B-
     * @apiVersion 1.0.0
     * @apiSampleRequest wq/swsinf/b/61783000
     * @apiParam   {String}         stcd               【必须】测站编码
     * @apiSuccess {Integer}        status             1:删除成功;0:要删除的数据不存在(可能已被删除).
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("{stcd:\\w{8}}")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response delete(@PathParam("stcd") String stcd) {
        LOGGER.info("根据主键删除 ,参数 stcd:{}", stcd);
        Integer rows = wqSwsinfBService.deleteByPrimaryKey(stcd);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }

    /**
     * @api {delete} wq/swsinf/b/by-filter [D][G]根据条件删除
     * @apiPrivate
     * @apiDescription [G]根据条件删除WQ_SWSINF_B()数据
     * @apiName (generate)delete by filter
     * @apiGroup WQ_SWSINF_B-
     * @apiVersion 1.0.0
     * @apiSampleRequest wq/swsinf/b/by-filter
     * @apiParam   {String}         stcd               测站编码
     * @apiParam   {List(String)}   watpList           (数组)测站名称
     * @apiParam   {String}         bsnm               测站等级
     * @apiParam   {String}         hnnm               测站类别
     * @apiParam   {String}         rvnm               经度
     * @apiParam   {Double}         asrlMin            (最小)纬度
     * @apiParam   {Double}         asrlMax            (最大)纬度
     * @apiParam   {Double}         asarMin            (最小)纬度
     * @apiParam   {Double}         asarMax            (最大)纬度
     * @apiParam   {Double}         asrcMin            (最小)行政区划代码
     * @apiParam   {Double}         asrcMax            (最大)行政区划代码
     * @apiParam   {Double}         dstrvmMin          (最小)水资源分区代码
     * @apiParam   {Double}         dstrvmMax          (最大)水资源分区代码
     * @apiParam   {String}         lrcd               管理单位
     * @apiParam   {Date}           fsstBgTm           (开始时间)监测单位
     * @apiParam   {Date}           fsstEdTm           (结束时间)监测单位
     * @apiParam   {Date}           fsetBgTm           (开始时间)监测频次
     * @apiParam   {Date}           fsetEdTm           (结束时间)监测频次
     * @apiParam   {List(String)}   bflList            (数组)建站年月
     * @apiParam   {String}         bfd                撤站年月
     * @apiParam   {List(String)}   wsflList           (数组)备注
     * @apiParam   {String}         wsct               暂无注释
     * @apiSuccess {Integer}        status             通常1或者>1:删除成功;0:没有符合条件的数据.
     * @apiSuccess {String}         message            成功/失败消息内容
     * @apiSuccess {Object}         data               额外返回的数据
     * @apiSuccessExample 删除成功:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":1,
     * "message":"成功",
     * "data":null
     *   }
     * }
     * @apiSuccessExample 删除失败:
     * HTTP/1.1 200 OK
     * {
     * "result": {
     * "status":0,
     * "message":"失败",
     * "data":null
     *   }
     * }
     * @apiUse exceptions
     */
    @DELETE
    @Path("by-filter")
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response deleteByFilter(WqSwsinfBQo filter) {
        LOGGER.info("根据条件删除 ,参数 WqSwsinfBQo:{}", filter);
        Integer rows = wqSwsinfBService.deleteByFilter(filter);
        return Response.ok(ApiResultBuilder.create(this, StatusRespBuilder.delete(rows))).build();
    }
}
